//
//  TYZJumpVCManager.m
//  DriveSchoolCoach
//
//  Created by TangBin on 2019/7/4.
//  Copyright © 2019 TangBin. All rights reserved.
//

#import "TYZJumpVCManager.h"

@implementation TYZJumpVCManager
+ (void)pushBaseVC:(UIViewController *)vc pushVC:(UIViewController *)pushVC
{
    [self pushBaseVC:vc pushVC:pushVC animated:YES];
}

+ (void)pushBaseVC:(UIViewController *)vc pushVC:(UIViewController *)pushVC animated:(BOOL)animated
{
    pushVC.hidesBottomBarWhenPushed = YES;
    if ([vc isKindOfClass:[UINavigationController class]])
    {
        [((UINavigationController *)vc) pushViewController:pushVC animated:YES];
    }
    else
    {
        [vc.navigationController pushViewController:pushVC animated:animated];
    }
}
+ (void)presentBaseVC:(UIViewController *)vc presentVC:(UIViewController *)presentVC completion:(void(^)(void))completion
{
    [self presentBaseVC:vc presentVC:presentVC animated:YES modalPresentationStyle:UIModalPresentationFullScreen completion:completion];
}

+ (void)presentBaseVC:(nullable UIViewController *)vc presentVC:(UIViewController *)presentVC modalPresentationStyle:(UIModalPresentationStyle)modalPresentationStyle completion:(void(^ __nullable)(void))completion
{
    [self presentBaseVC:vc presentVC:presentVC animated:YES modalPresentationStyle:modalPresentationStyle completion:completion];
}

+ (void)presentBaseVC:(nullable UIViewController *)vc presentVC:(UIViewController *)presentVC animated:(BOOL)animated completion:(void(^ __nullable)(void))completion
{
    [self presentBaseVC:vc presentVC:presentVC animated:animated modalPresentationStyle:UIModalPresentationFullScreen completion:completion];
}

+ (void)presentBaseVC:(nullable UIViewController *)vc presentVC:(UIViewController *)presentVC animated:(BOOL)animated modalPresentationStyle:(UIModalPresentationStyle)modalPresentationStyle completion:(void(^ __nullable)(void))completion
{
    
    presentVC.modalPresentationStyle = modalPresentationStyle;
    [vc presentViewController:presentVC animated:animated completion:completion];
}
@end
